package com.chinanet.controller.manager;

import com.chinanet.entry.netelement.Wynl;
import com.chinanet.service.faultanticipate.LoadModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/wynl")
public class WynlController {
    @Autowired
    private LoadModel service;

    @RequestMapping(value = "/list/{code}", method = RequestMethod.GET)
    public Wynl get(@PathVariable String code) {
        return service.getWynlList().get(code);
    }
    @RequestMapping(value = "/model", method = RequestMethod.GET)
    public String model() {
        return service.getModelJson();
    }
}
